#pragma once
#ifndef _Misc
#define _Misc
#include <list>
#include <string>
#include <vector>
using namespace std;
// below define the macro of the new rule considering the base flow
// if you need it, unmark the line.
#define _NEW_RULE_OF_BASEFLOW
const double error = -1;
const unsigned int nCV = 4; // the maximal digits of number of composite outputs contained in a NCU
extern string errMsg;
extern string msg[];
const char TypeA = 'A';
const char TypeB = 'B';
const char TypeC = 'C';
const char TypeD = 'D';
const char ErrorType = 'X';
const double squarekm2squarem = (1000*1000);
const double minute2second = 60;
const double mm2m = ((1.0/10)/100);
typedef pair<double, double>  outputPair;
//typedef list<Rnum> doubleChromosome;
double threshold(double, double);
string strToken(string &inStr, const char delim);
// coefficient of efficiency
float coe(const vector<double>& evalRunoff , const vector<double>& obsRunoff);
// simple least square
float sls(const vector<double>& evalRunoff,
		  const vector<double>& obsRunoff);
void move(vector<double>::const_iterator &iter, const int &steps);
double accuracy(const double upper, const double lower, const unsigned int length);
unsigned int digits(const double upper, const double lower, const double acu);
#endif